//
//  EDSPlayTransport.h
//  DrivieSchoolStudents
//
//  Created by TangBin on 2019/5/24.
//  Copyright © 2019 班文政. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
// 对视频操作的相关代理


@protocol EDSPlayTransportDelegate <NSObject>

/**
 播放
 */
- (void)play;

/**
 暂停
 */
- (void)pause;

/**
 停止
 */
- (void)stop;

/**
 返回
 */
- (void)back;

/**
 跳转到某个时间点播放

 @param time time description
 */
//- (void)jumpedToTime:(NSTimeInterval)time;

/**
 视频横屏
 
 @param flag YES表示是横屏
 */
//- (void)fullScreenOrNormalSizeWithFlag:(BOOL)flag;

@end


NS_ASSUME_NONNULL_BEGIN

@protocol EDSPlayTransport <NSObject>

@property (nonatomic, assign) BOOL isBuffering; ///< 是否正在缓冲

@property (nonatomic, assign) BOOL isFinishedJump; ///< 是否完成跳转

@property (nonatomic, assign) NSTimeInterval durationTime; ///< 视频总的时长

/**
 播放、暂停、停止、跳转、视频横屏
 */
@property (nonatomic, weak) id<EDSPlayTransportDelegate> delegate;

@property (nonatomic, assign) NSTimeInterval currentPlayTime; ///< 当前播放的时间点

@property (nonatomic, assign) NSTimeInterval currentBufferTime; ///< 当前缓冲的时间点

@optional
/**
 视频方完毕
 */
- (void)playbackComplete;

/**
 进入后台后，暂停播放
 */
- (void)bgPause;


@end

NS_ASSUME_NONNULL_END






























